// in java, you use import, here you use var
var AlertDialog 		= $.android.app.AlertDialog;
var Builder 			= AlertDialog.$Builder; 
var R 					= $.net.stonezhong.scripthostapp.R;
var OnClickListenerImpl	= $.orangeScript.android.helper.OnClickListenerImpl;
 
var activity = getObject(args[0]);
var msg = activity.findViewById(R.$id.abc);
msg.setText("Use Orange Script to write Android App!");

Builder.new(activity)
	.setTitle("Alert Dialog")
	.setMessage("This is Example of Alert Dialog with three Buttons")
	.setPositiveButton("OK", OnClickListenerImpl.new(function() {
		msg.setText("You clicked ok");
	}))
	.setNegativeButton("Cancel", OnClickListenerImpl.new(function() {
		msg.setText("You clicked cancel");
	}))
	.setNeutralButton("Close", OnClickListenerImpl.new(function() {
		msg.setText("You clicked close");
	}))
	.show();
	